﻿using System.Windows.Controls;

namespace content.A05
{
    public partial class A0501:Page
    {
        public A0501()
        {
            InitializeComponent();
            Loaded += delegate
            {
                B b = new C();
                TextBlock1.Text = b.Result;
            };
        }
        public class A
        {
            public string Result { get; protected set; } = "";
            public A()
            {
                Result += "A\n";
            }
        }

        public class B : A
        {
            public B()
            {
                Result += "B\n";
            }
        }

        public class C : B
        {
            public C()
            {
                Result += "C\n";
            }
        }
    }
}